import BTConditional from '../../Base/BTConditional'
import BlackBoard from '../../BlackBoard'
import { NodeStatus } from '../../Enum'

export default class ConditionalMP extends BTConditional {
  onUpdate() {
    console.log(
      'BlackBoard.Instance.mp',
      BlackBoard.Instance.mp,
      'ConditionalMP判断结果为:',
      BlackBoard.Instance.mp >= 100
    )

    if (BlackBoard.Instance.mp >= 100) {
      return NodeStatus.Success
    }
    return NodeStatus.Failure
  }
}
